<template>
  <div>

    <p class="p1">确认提现密码:</p>
    <van-password-input :value="value" @focus="showKeyboard = true" class="shu"/>
    <van-number-keyboard :show="showKeyboard" @input="onInput" @delete="onDelete" @blur="showKeyboard = false"/>

    <van-button type="info" class="but" @click="btn()">完成</van-button>

  </div>
</template>

<script>
  export default {
    name: "Qmima",
    data(){
      return{
        value: '',
        showKeyboard: false
      }
    },
    methods:{
      btn(){
        if (this.value.length == 6){
          this.$router.push({
            path:'/tixian'
          })
        }
      },
      onInput(key) {
        this.value = (this.value + key).slice(0, 6);
      },
      onDelete() {
        this.value = this.value.slice(0, this.value.length - 1);
      }
    }
  }
</script>

<style scoped>
  .p1{
    font-size:0.3rem;
    color:rgba(51,51,51,1);

    width: 92%;
    margin: auto;
    margin-top: 0.5rem;
  }
  .shu{
    margin-top: 0.45rem;
    border: 0.01rem solid #90CAFF;
  }
  .but{
    width: 100%;
    height: 0.88rem;
    background:rgba(2,135,255,1);
    font-size:0.36rem;
    font-weight:bold;
    color:rgba(255,255,255,1);
    position: absolute;
    bottom: 0;
  }
</style>
